﻿<%@ Page  StylesheetTheme="GlobleTheme" Language="C#" MasterPageFile="~/Shared/MainPage.Master" AutoEventWireup="true" CodeBehind="QueryAccessoryStockByPersonal.aspx.cs" Inherits="Runda.CMS.Portal.StockManagement.QueryAccessoryStockByPersonal" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<%@ Register Assembly="RadAjax.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %>
<%@ Register Assembly="RadGrid.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphHead" runat="server">

    <script src="../Content/jquery-1.3.2.min.js" type="text/javascript"></script>
    <script src="../Content/global.js" type="text/javascript"></script>     
    <link href="../Content/global.css" rel="stylesheet" type="text/css" />
    <link href="../Content/Menu/Menu.css" rel="stylesheet" type="text/css" /> 
    <link href="../Content/Find/find.css" rel="stylesheet" type="text/css" />
    <link href="../Content/Pager.css" rel="stylesheet" type="text/css" />
       <script type="text/javascript">

           function OnRowDblClick(sender, eventArgs) {

               //alert("DblClick on row instance: " + eventArgs.get_itemIndexHierarchical());

           }

           $(function() {

               var countSum = $('#<%=hfcount.ClientID %>').val();
               var quantitySum = $('#<%=hfquantitySum.ClientID %>').val();

               $('#ctl00_cphBody_AspNetPager1').before("<table class='MasterTable_OCM' cellspacing='0' border='0' border='0' width='100%'><tr class='GridFooter_OCM' style='white-space:nowrap;text-align:left;'><td width='10%'>合计：</td><td width='10%'>" + countSum + "</td><td width='30%'>&nbsp;</td><td width='10%'>&nbsp;</td><td width='10%'>&nbsp;</td><td width='5%'>&nbsp;</td><td width='13%'>&nbsp;</td>" + "<td width='12%'>" + quantitySum + "</td></tr></table>");

           })
          
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphBody" runat="server">
    <%--<rad:RadAjaxManager ID="radajaxmanager1" runat="server">
<AjaxSettings>
<rad:AjaxSetting AjaxControlID="gridList">
<UpdatedControls>

<rad:AjaxUpdatedControl ControlID="gridList" />
</UpdatedControls>
</rad:AjaxSetting>
</AjaxSettings>
</rad:RadAjaxManager>--%>
<div class="Container">
        <table id="appFind" class="find" cellspacing="0" cellpadding="0" border="0"> 
            <tbody>
                <tr height="23">
                    <td class="wizHead" colspan="7">
                        <table style="table-layout: fixed; font-size: 9pt" cellspacing="0" cellpadding="0" width="100%" height="100%">
                            <colgroup>
                                <col>
                                <col width="60">
                                <col width="60"> 
                                <tr><td style="color:#ffffff"><b>查询</b></td><td class="icMenu mnuRight" noWrap></td></tr>
                        </table>
                    </td>
                </tr>
                <tr id="__appFind_trQuery" height="40">
                    <td class="wizBox1" colspan="7">
                    <table id="__appFind_tbQuery1" style="TABLE-LAYOUT: fixed; FONT-SIZE: 9pt" height="100%" cellSpacing="5" cellPadding="5" width="100%">
                    <tr>
                        <td align="right" style="width:5%">类型</td>
                        <td align="left" style="width:10%">
                            <asp:DropDownList ID="ddlAccessoryType" runat="server">
                            <asp:ListItem Text="--不限--" Value ="0" Selected="True" />
                            <asp:ListItem Text="易耗件" Value ="2" Selected="false" />
                            <asp:ListItem Text="配件" Value ="1" Selected="false" />
                            </asp:DropDownList>
                        </td>
                        <td style="width:10%">配件编号：</td>
                        <td style="width:15%"><asp:TextBox ID="txtAccessoryName" runat="server" Width=120px></asp:TextBox></td>
                        <td  style="width:5%">厂家</td>
                        <td style="width:10%">
                            <asp:DropDownList ID="ddlVendor" runat="server">
                            </asp:DropDownList>
                        </td>
                        <td style="width:10%">个人姓名：</td>
                        <td style="width:15%"><asp:TextBox ID="txtUserName" runat="server"  Width="120px"></asp:TextBox></td>
                        <td style="width:20%"><asp:Button ID="btnSearch" runat="server" Text="查找" CssClass="button" Width=80px onclick="btnSearch_Click"/> &nbsp;&nbsp;<asp:Button ID="btnExportExcel" runat="server" Text="导出(Excel)" CssClass="button" onclick="btnExportExcel_Click"/></td>
                    </tr></table>
                    </td>
                </tr>
            </tbody>
    </table>            
</div>

 <div class="Container">         
         <table class="mnubar" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td style="padding-left: 5px" nowrap>
                        <b>列表</b>
                    </td>
                    <td style="padding-left: 5px">
                        <img src="../Content/Grid/separator.gif">
                    </td>
                    <td class="icMenu" nowrap> 
                    </td>
                    <td class="icMenu mnuRight" nowrap>
                    </td>
                </tr>
            </tbody>
        </table>       
        <div style="border-bottom: #c2c2bf 1px solid; border-top: #969693 1px solid">
        </div>
            <asp:Panel runat="server" ID="panel1" style="overflow:scroll"> 
                <rad:RadGrid runat="server" ID="gridList" EnableAJAX="True" 
                    EnableAJAXLoadingTemplate="True"  AutoGenerateColumns="False" AllowPaging ="false"
                    AllowSorting="True" onitemdatabound="gridList_ItemDataBound" 
                    onsortcommand="gridList_SortCommand" GridLines="None">
                    <ClientSettings EnableClientKeyValues="True">
                        <Selecting AllowRowSelect="True" />
                        <ClientEvents OnRowDblClick="OnRowDblClick" />
                         <Resizing AllowColumnResize="true" />
                    </ClientSettings>
                    <AJAXLoadingTemplate>
                        加载中...
                    </AJAXLoadingTemplate>
                    <MasterTableView DataKeyNames="AccessoryID">
                        <RowIndicatorColumn>
                            <HeaderStyle Width="20px" />
                        </RowIndicatorColumn>
                        <ExpandCollapseColumn>
                            <HeaderStyle Width="20px" />
                        </ExpandCollapseColumn>
                        <Columns>
                            <rad:GridBoundColumn AllowSorting="true" DataField="UserName" 
                                HeaderText="姓名">
                                <ItemStyle Width="10%" />
                            </rad:GridBoundColumn>
                            <rad:GridBoundColumn AllowSorting="true" DataField="CompanyInstrumentCode" 
                                HeaderText="配件编号（公司）">
                                <ItemStyle Width="10%" />
                            </rad:GridBoundColumn>
                            <rad:GridBoundColumn AllowSorting="true" DataField="AccessoryName" 
                               HeaderText="配件名称">
                                <ItemStyle Width="30%" />
                            </rad:GridBoundColumn>
                            <rad:GridBoundColumn AllowSorting="true" DataField="FactoryInstrumentCode" 
                                HeaderText="厂家编号">
                                <ItemStyle Width="10%" />
                            </rad:GridBoundColumn>
                            <rad:GridBoundColumn AllowSorting="true" DataField="AccessoryStandard" 
                                HeaderText="规格">
                                <ItemStyle Width="10%" />
                            </rad:GridBoundColumn>
                            <rad:GridBoundColumn AllowSorting="true" DataField="Unit" 
                                HeaderText="单位">
                                <ItemStyle Width="5%" />
                            </rad:GridBoundColumn>
                            <rad:GridBoundColumn AllowSorting="true" DataField="PresellPrice" 
                                DataFormatString="{0:N}" HeaderText="销售价">
                                <ItemStyle Width="8%" />
                            </rad:GridBoundColumn>
                            <rad:GridBoundColumn AllowSorting="true" DataField="Quantity" 
                                DataFormatString="{0:N}" HeaderText="当前库存数量">
                                <ItemStyle Width="10%" />
                            </rad:GridBoundColumn>
                            <rad:GridBoundColumn AllowSorting="true" DataField="coStockquantity" 
                                DataFormatString="{0:N}" HeaderText="公司仓库数量">
                                <ItemStyle Width="7%" />
                            </rad:GridBoundColumn>
                            
                        </Columns>
                    </MasterTableView>
                </rad:RadGrid>  
                   <webdiyer:AspNetPager ID="AspNetPager1" runat="server" CssClass="paginator" PageSize="20" AlwaysShow ="true"
                                CurrentPageButtonClass="cpb" CustomInfoHTML="第%CurrentPageIndex%页，共%PageCount%页，每页%PageSize%条" 
                                FirstPageText="首页" LastPageText="尾页" NextPageText="下一页" PrevPageText="上一页" 
                                ShowCustomInfoSection="Left" Width="100%" LayoutType="Table"  
                                SubmitButtonClass="but" SubmitButtonText="转到" onpagechanged="AspNetPager1_PageChanged">
                            </webdiyer:AspNetPager>    
             </asp:Panel>
         </div>
    <asp:HiddenField ID="hfcount" runat="server" />
    <asp:HiddenField ID="hfquantitySum" runat="server" />
</asp:Content>
